﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using TF.Access;

public partial class Header : System.Web.UI.UserControl
{
    protected string loginOrNot;
    protected string myfootrip;
    protected void Page_Load(object sender, EventArgs e)
    {
        string hasLogin = "<li><font class='userName'>{0},你好！</font> | </li><li><a href='#' onclick='Logout();return false'>退出</a> | </li>";

        string notLogin = "<li><a href='#' onclick=\"return loginInitial();\">登陆</a> | </li><li><a href='#' onclick=\"return regInitial();\">注册</a> | </li>";
        TF_UserProfile u = WebUtility.GetUserProfile();
        if (u != null)
        {
            loginOrNot = string.Format(hasLogin, u.Nick_Name);
            myfootrip = "<a href='home.aspx'>我的足迹</a>";
        }
        else
        {
            loginOrNot = notLogin;
            myfootrip = "<a href='#' onclick='return loginInitial();'>我的足迹</a>";
        }
    }
}
